package com.yxzz.core.service.impl;

import com.yxzz.core.domain.PHealthHistory;
import com.yxzz.core.mapper.PHealthHistoryMapper;
import com.yxzz.core.service.IPHealthHistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 病人健康史Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-02-28
 */
@Service
public class PHealthHistoryServiceImpl implements IPHealthHistoryService 
{
    @Autowired
    private PHealthHistoryMapper pHealthHistoryMapper;

    /**
     * 查询病人健康史
     * 
     * @param id 病人健康史主键
     * @return 病人健康史
     */
    @Override
    public PHealthHistory selectPHealthHistoryById(Long id)
    {
        return pHealthHistoryMapper.selectPHealthHistoryById(id);
    }

    /**
     * 查询病人健康史列表
     * 
     * @param pHealthHistory 病人健康史
     * @return 病人健康史
     */
    @Override
    public List<PHealthHistory> selectPHealthHistoryList(PHealthHistory pHealthHistory)
    {
        return pHealthHistoryMapper.selectPHealthHistoryList(pHealthHistory);
    }

    /**
     * 新增病人健康史
     * 
     * @param pHealthHistory 病人健康史
     * @return 结果
     */
    @Override
    public int insertPHealthHistory(PHealthHistory pHealthHistory)
    {
        return pHealthHistoryMapper.insertPHealthHistory(pHealthHistory);
    }

    /**
     * 修改病人健康史
     * 
     * @param pHealthHistory 病人健康史
     * @return 结果
     */
    @Override
    public int updatePHealthHistory(PHealthHistory pHealthHistory)
    {
        return pHealthHistoryMapper.updatePHealthHistory(pHealthHistory);
    }

    /**
     * 批量删除病人健康史
     * 
     * @param ids 需要删除的病人健康史主键
     * @return 结果
     */
    @Override
    public int deletePHealthHistoryByIds(Long[] ids)
    {
        return pHealthHistoryMapper.deletePHealthHistoryByIds(ids);
    }

    /**
     * 删除病人健康史信息
     * 
     * @param id 病人健康史主键
     * @return 结果
     */
    @Override
    public int deletePHealthHistoryById(Long id)
    {
        return pHealthHistoryMapper.deletePHealthHistoryById(id);
    }
}
